package com.yrh.service.impl;

import com.yrh.bean.TOrder;
import com.yrh.dao.TOrderDao;
import com.yrh.dao.impl.TOrderDaoImpl;
import com.yrh.service.TOrderService;

import java.util.List;
/*订单业务层接口实现类*/
public class TOrderServiceImpl implements TOrderService {
    private TOrderDao dao=new TOrderDaoImpl();
    //查询所有订单(包含分页)
    @Override
    public List<TOrder> allOrder(TOrder tOrder,String userRole,int uid, int nowPage, int size) {
        return dao.allOrder(tOrder,userRole, uid,nowPage,size);
    }
    //修改订单状态
    @Override
    public int updateType(TOrder tOrder) {
        return dao.updateType(tOrder);
    }
/*生成订单*/
    @Override
    public int addOrder(TOrder order) {
        return dao.addOrder(order);
    }

    @Override
    public int maxOrderId() {
        return dao.maxOrderId();
    }
}
